package shuashuami.hb.com.entity.agent;

import org.json.JSONObject;

/**
 * created by zhangqi at 2017/7/5
 */
// 代理用户
public class User {
    private String id;
    private String mobile;
    private String password;
    private String username;
    private String realname;
    private String identify;
    private String qq;
    private String email;
    private String wx_sn;
    private String avatar;
    private String addtime;
    private String status;
    private String parent_id;
    private String alipay_realname;
    private String alipay_account;
    private String bankcard_name;
    private String bankcard_identify;
    private String bank_id;
    private String bankcard_no;
    private String bankcard_address;
    private String bankcard_info;
    private float money;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getIdentify() {
        return identify;
    }

    public void setIdentify(String identify) {
        this.identify = identify;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getWx_sn() {
        return wx_sn;
    }

    public void setWx_sn(String wx_sn) {
        this.wx_sn = wx_sn;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getAddtime() {
        return addtime;
    }

    public void setAddtime(String addtime) {
        this.addtime = addtime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getParent_id() {
        return parent_id;
    }

    public void setParent_id(String parent_id) {
        this.parent_id = parent_id;
    }

    public String getAlipay_realname() {
        return alipay_realname;
    }

    public void setAlipay_realname(String alipay_realname) {
        this.alipay_realname = alipay_realname;
    }

    public String getAlipay_account() {
        return alipay_account;
    }

    public void setAlipay_account(String alipay_account) {
        this.alipay_account = alipay_account;
    }

    public String getBankcard_name() {
        return bankcard_name;
    }

    public void setBankcard_name(String bankcard_name) {
        this.bankcard_name = bankcard_name;
    }

    public String getBankcard_identify() {
        return bankcard_identify;
    }

    public void setBankcard_identify(String bankcard_identify) {
        this.bankcard_identify = bankcard_identify;
    }

    public String getBank_id() {
        return bank_id;
    }

    public void setBank_id(String bank_id) {
        this.bank_id = bank_id;
    }

    public String getBankcard_no() {
        return bankcard_no;
    }

    public void setBankcard_no(String bankcard_no) {
        this.bankcard_no = bankcard_no;
    }

    public String getBankcard_address() {
        return bankcard_address;
    }

    public void setBankcard_address(String bankcard_address) {
        this.bankcard_address = bankcard_address;
    }

    public String getBankcard_info() {
        return bankcard_info;
    }

    public void setBankcard_info(String bankcard_info) {
        this.bankcard_info = bankcard_info;
    }

    public float getMoney() {
        return money;
    }

    public void setMoney(float money) {
        this.money = money;
    }

    public void resolveByJson(String content) throws Exception{
        JSONObject object=new JSONObject(content);
        setRealname(object.getString("realname"));
        setMobile(object.getString("mobile"));
        setAddtime(object.getString("addtime"));
        setPassword(object.getString("password"));
        setUsername(object.getString("username"));
        setIdentify(object.getString("identify"));
        setQq(object.getString("qq"));
        setEmail(object.getString("email"));
        setWx_sn(object.getString("wx_sn"));
        setAvatar(object.getString("avatar"));
        setStatus(object.getString("status"));
        setParent_id(object.getString("parent_id"));
        setAlipay_realname(object.getString("alipay_realname"));
        setAlipay_account(object.getString("alipay_account"));
        setBankcard_name(object.getString("bankcard_name"));
        setBankcard_identify(object.getString("bankcard_identify"));
        setBank_id(object.getString("bank_id"));
        setBankcard_no(object.getString("bankcard_no"));
        setBankcard_address(object.getString("bankcard_address"));
        setBankcard_info(object.getString("bankcard_info"));
        setMoney(Float.parseFloat(object.getDouble("money")+""));
    }

}
